import cartIndex from "@/views/cart/index.vue";
import getOrder from "@/views/cart/order.vue";
import pay from "@/views/cart/pay.vue";

// 创建子路由列表
let routes = [
    {
        name:"cartIndex",
        path:"index",
        component:cartIndex,
        meta:{login:true}
    },
    {
        name:"getOrder",
        path:"getOrder",
        component:getOrder,
        meta:{login:true}
    },
    {
        name:"pay",
        path:"pay",
        component:pay,
        meta:{login:true}
    }
]

let parentRouter = {
    template:"<router-view></router-view>"
}

export default [
    {
        name:"cart",
        path:"/cart",
        component:parentRouter,
        children:routes
    }
]